//
//  UITools.m
//  DogeLegs
//
//  Created by 宋华 on 2017/8/15.
//  Copyright © 2017年 宋华. All rights reserved.
//

#import "UITools.h"

@implementation UITools


CGFloat iphoneVersion() {
    static CGFloat sharedManager;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^ {
        sharedManager = [[[UIDevice currentDevice] systemVersion] floatValue];
    });
    return sharedManager;
}


#pragma mark - 圆角和边框
void setCornerRadius(UIView *view,CGFloat cornerRadius) {
    view.layer.masksToBounds = YES;
    view.layer.cornerRadius = cornerRadius;
}

void setBorder(UIView *view,CGFloat borderWidth ,CGColorRef color) {
    view.layer.borderColor = color;
    view.layer.borderWidth = borderWidth;
}




@end
